﻿@{Htss.Platform.Web.HtmlHelper Html = new Htss.Platform.Web.HtmlHelper();}
<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <title>用户-@DreamBox.DAL.SiteConfig.Config.SiteName-@DreamBox.DAL.SiteConfig.Config.Title</title>
    <meta name="description" content="@DreamBox.DAL.SiteConfig.Config.Description" />
    <meta name="keywords" content="@DreamBox.DAL.SiteConfig.Config.KeyWords" />
    <script type="text/javascript" src="/tools/js/jquery-2.1.1.min.js"></script>
    <link href="/style/metro/css/metro-bootstrap.css" rel="stylesheet" />
    <script src="/style/metro/css/metro.min.js"></script>
</head>
<body class="metro">
    <div class="container">
        @Html.Action("", "header")
        <div class="row offset3">
            <div class="span12 padding10">
                <a href="/u" id="DefaultOrder" class="button">默认</a>
                @if (Html.Session["UserID"] != null)
                {
                    <a href="/u?t=location" id="SameLocation" class="button">同城</a>
                }
                <script type="text/javascript">
                    function SetActive() {
                        var t = '@(Html.Request.QueryString["t"] == null ? "default" : Html.Request.QueryString["t"])';
                        if (t == "location") {
                            $("#SameLocation").attr("class", "button primary");
                        }
                        else if (t == "contribution") {
                            $("#Contribution").attr("class", "button primary");
                        }
                        else {
                            $("#DefaultOrder").attr("class", "button primary");
                        }
                    }
                    SetActive();
                </script>
            </div>
        </div>
        <div class="row offset3">
            <div class="span12">
                @foreach (Htss.Platform.Data.DbRow row in Html.ViewDbTable["ListData"].Rows)
                {
                    <table class="table table-bordered" style="">
                        <tr>
                            <td rowspan="3" style="width:100px;height:100px;">
                                <img style="width:100px;height:100px;" src="@(row["Avatar"])" alt="@(row["UserName"])" />
                            </td>
                            <td style="width:180px;">用户名:@(row["UserName"])</td>
                            <td style="width:60px;">性别:@(row["Sex"].ToString() == "3" ? "保密" : row["Sex"].ToString() == "1" ? "男" : "女")</td>
                            <td>Ta在:@(row["Location"])</td>
                        </tr>
                        <tr>
                            <td colspan="3">标签:@(row["Tags"])</td>
                        </tr>
                        <tr>
                            <td colspan="3"><a href="JavaScript:userFriendsLaunchAdd(@(row["UserID"]))" title="" class="button primary" id="friends_@(row["UserID"])">加为好友</a></td>
                        </tr>
                    </table>
                }
            </div>
        </div>
        <div class="row offset3">
            <div class="span12">
                @Html.ViewData["ListPage"]
            </div>
        </div>
        @Html.Action("", "footer")
    </div>
    <script src="/js/tips.js" type="text/javascript"></script>
    <script src="/js/user.js" type="text/javascript"></script>
</body>
</html> 